import java.io.*;

public class Test2 {
    public static void main(String[] args) throws IOException {
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream("D:/img1/cm.jpg"));

        BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("D:/img2/cc.jpg"));

        byte [] bytes = new byte[1024];
        int a ;
        while ((a=bis.read(bytes))!=-1){
            bos.write(a);
        }
        bos.close();
        bis.close();










    }
}

